import { HttpUtil } from "../../engine/utils/HttpUtil";

const request = require('request');

export class GameHttpHelper {

    private static sendHttpLog(params: object) {
        let url: string = "http://127.0.0.1:9000"
        HttpUtil.request_by_body(url, params)
    }

    public static get_online_num(url:string){
        return new Promise((resolve, reject) => {
            HttpUtil.request_by_body(url, {}, (response)=>{
                if(response["status"] == 200){
                    resolve(response["data"])
                }
            })
        })
    }

}